<template>
  <div>
    <GpBaseTable primary-key="id" :columns="columns" :url="url" :params="getParams" sync-data-url="/xcdhTrading/hotMoneyTrc/syncHotMoneyTrc" ></GpBaseTable>
  </div>
</template>

<script>
export default {
  name: "HotMoney" ,
  props:{
    tsCodes: {
      type: Array ,
      default(){
        return []
      }
    }
  },
  data(){
    return{
      columns:[
        {
          "title": "交易日期",
          "key": "tradeDate",
          search: true ,
          is: "el-date-picker" ,
          attrs:{
            "value-format":"yyyyMMdd"
          }
        },
        {
          "title": "股票名称",
          search: true ,
          op: 'LIKE' ,
          "key": "tsName"
        },
        {
          key: 'nums' ,
          title: '连板数量',
        },
        {
          "title": "股票价格",
          "key": "showPrice",
          tableIs: "ShowGpPrice"
        },
        {
          "title": "股票涨幅",
          "key": "pctChg",
          tableIs: "NumberColumn",
        },
        {
          key: 'turnoverRate' ,
          title: '换手率',
        },
        {
          key: 'volumeRatio' ,
          title: '量比',
        },
        {
          "title": "买入金额（元）",
          "key": "buyAmount",
          tableIs: "BigNumberColumn" ,
        },
        {
          "title": "卖出金额（元）",
          "key": "sellAmountAbs",
          tableIs: "BigNumberColumn" ,
        },
        {
          "title": "净买卖（元）",
          "key": "netAmount",
          tableIs: "BigNumberColumn" ,
        },
        {
          "title": "游资名称",
          search: true ,
          op: 'LIKE' ,
          "key": "hmName"
        }
      ] ,
      url: "/xcdhTrading/hotMoneyTrc/v2/listByPage"
    }
  },
  methods:{
    getParams(){
      return [
        {
          key: 'tsCode',
          op: 'IN',
          value: this.tsCodes
        },
        {
          key: 'sellAmount',
          op: 'EQ',
          value: 0
        }
      ]
    }
  }
}
</script>

<style scoped>

</style>
